package airplane.com.example.mapper;

import airplane.com.example.entry.Airplane;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface AirplaneMapper {
    List<Airplane> queryAirplaneList();
    Airplane queryAirplaneByName(String airplane);
    int insertAirplane(Airplane airplane);
    int updateAirplane(Airplane airplane);
    int deleteAirplane(String airplane);

    // 分页查询
    List<Airplane> findByPage(@Param("start") Integer currentPage, @Param("end") Integer pageSize);

    // 查询总页数
    int findTotal();
}
